How to: Delete Windows 95 System Files from the command prompt.
Solution:
Boot to the command prompt only and delete all Windows 95 system files. Run ScanDisk, boot from a DOS system diskette, and reinstall the DOS system files.
1) Make sure a bootable DOS diskette that contains the Sys.com file is available.
CAUTION: Do not continue this procedure if a bootable diskette is NOT available.
2) Turn on the computer.
3) Wait for the 'Starting Windows 95' message to appear.
4) Press F8 IMMEDIATELY. (The text-mode 'Windows 95 Startup Menu' appears.)
NOTE: You have only a few seconds to press F8, before the system continues to load.
5) Select 'Command prompt only'.
6) Type the following commands at the command prompt, and press ENTER after each line:
COPY \WINDOWS\COMMAND\DELTREE.EXE C:
COPY \WINDOWS\COMMAND\SCANDISK.* C:
7) Configure ScanDisk to remove invalid (for a previous DOS version) filename characters and volume names:
a) Type the following command, and press ENTER:
EDIT SCANDISK.INI
b) Find the line that looks like the following:
labelcheck=off
c) Edit the line to look like the following:
labelcheck=on
d) Find the line that looks like the following:
spacecheck=off
e) Edit the line to look like the following:
spacecheck=on
f) Save the changes to Scandisk.ini and exit the editor.
8) Type the following command, and press ENTER:
SCANDISK <drive>:
(where <drive> is the drive that contains Windows 95).
NOTE: Consult the ScanDisk Help if ScanDisk detects errors during its file system check.
9) Type the following at the MS-DOS prompt, and press ENTER:
DELTREE <Windows 95>
(where <Windows 95> is the directory that contains Windows 95 files, usually 'C\WINDOWS').
CAUTION: Before performing the next step, make sure that no important files (that have not been backed up) are contained in the Windows 95 directory or any of its subdirectories. The DELTREE command deletes all files AND all subdirectories.
10) To delete the Windows 95 configuration files, type the following commands, and press ENTER after each line:
DELTREE CONFIG.SYS
DELTREE AUTOEXEC.BAT
11) Type the following command, and press ENTER:
DIR WINBOOT.*
12) (Special Case) If the DIR WINBOOT command shows one or more WINBOOT.* files, then type the following at the prompt, and press ENTER:
DELTREE WINBOOT.*
NOTE: If the DIR WINBOOT command reports no files found, then skip step 12) and go on to step 13).
13) To delete the Windows 95 log files, type the following commands, and press ENTER after each line:
DELTREE SETUPLOG.*
DELTREE BOOTLOG.*
DELTREE DETLOG.*
14) Do one of the following, based on whether the boot drive is compressed:
a) If the boot drive is compressed (for example, with DriveSpace or Stacker), then type the following commands, and press ENTER after each line:
H:
DELTREE IO.SYS
DELTREE MSDOS.SYS
(where H: is the correct drive letter for the host drive of the compression software).
b) If the boot drive is not compressed, then type the following commands, and press ENTER after each line:
DELTREE IO.SYS
DELTREE MSDOS.SYS
15) (Special Case) If your boot drive was compressed using compression software other than Stacker version 3.1, then type the following at the prompt, and press ENTER:
DELTREE D??SPACE.BIN
NOTE: If you are using Stacker version 3.1, or if you are not using any compression software, then skip step 15) and go to step 16).
16) To delete the Windows 95 command processor, type the following command, and press ENTER:
DELTREE COMMAND.COM
17) Insert the bootable DOS diskette in the floppy drive.
18) Press CTRL+ALT+DEL to reboot the computer from the diskette.
19) To reinstall the DOS system files on the hard drive, type the following command from the diskette, and press ENTER:
SYS C:
(where C: is the letter designation of the drive that contains Windows 95).
20) (Optional) To start the DOS system with the previous configuration files, type the following commands, and press ENTER after each line:
COPY C:\CONFIG.DOS C:\CONFIG.SYS
COPY C:\AUTOEXEC.DOS C:\AUTOEXEC.BAT
21) (Special Case) If you are using MS-DOS 6.0 and DoubleSpace disk compression, then type the following at the MS-DOS prompt, and press ENTER:
COPY C:\DOS\DBLSPACE.BIN C:
22) (Special Case) If Config.sys contains a 'SHELL=' line that references Command.com in a different directory from the root directory, then type the following at the MS-DOS prompt, and press ENTER:
COPY C:\DOS\COMMAND.COM C:
(where C:\DOS should be the directory that contains the Command.com referenced in the Config.sys SHELL statement).